package com.bsi.login.oauth.entity;

/*
 * Author: liusongs
 * Date: 2019/10/20 18:15
 * Content: oauth特定枚举类，对拿到token,刷新token，校验token的uri，granttype的封装
 */
public enum OauthVisitModeEnum {

    refresh_mode("refresh_token", "/oauth/token"), // 刷新token的grant_type
    token_mode("password", "/oauth/token"), //获取token的grant_type
    check_mode(null, "/oauth/check_token"), //校验token 不需要传递grant_Type值
    delete_mode(null, "/oauth/exit"); // oauth2的退出url(在oauth2的SecurityConfig类中配置)

    private String grantType; // 模式

    private String tokenUriInfo;// 访问地址

    OauthVisitModeEnum(String grantType, String tokenUriInfo) {
        this.grantType = grantType;
        this.tokenUriInfo = tokenUriInfo;
    }

    public String getGrantType() {
        return grantType;
    }

    public void setGrantType(String grantType) {
        this.grantType = grantType;
    }

    public String getTokenUriInfo() {
        return tokenUriInfo;
    }

    public void setTokenUriInfo(String tokenUriInfo) {
        this.tokenUriInfo = tokenUriInfo;
    }
}